<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: 25443
  Date: 2021/3/5
  Time: 19:34
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<div>
    <h1 style="text-align: center">图书系统</h1>
</div>
<div>
<tr>
    <td><a href="/book/allBook">首页</a></td>
    <td>  <a href="/book/toAdd">添加书籍</a></td>
    <td>  <a href="/user/remove">退出登录</a></td>
    <td>
        <form action="/book/quaryByName" method="get">
            <input type="text" name="name">
            <button>查询</button>
        </form>
    </td>
</tr>

</div>
<table>
    <thead>
      <tr>
          <th>编号</th>
          <th>书名</th>
          <th>数量</th>
          <th>介绍</th>
      </tr>
    </thead>
<tbody>
<c:forEach items="${list}" var="book">
    <tr>
        <th>${book.bookId}</th>
        <th>${book.bookName}</th>
        <th>${book.bookCounts}</th>
        <th>${book.bookComment}<a href="${pageContext.request.contextPath}/book/del/${book.bookId}">删除</a><a href="${pageContext.request.contextPath}/book/toAlter/${book.bookId}">修改</a></th>
    </tr>
</c:forEach>
</tbody>
</table>

</body>
</html>
